<template>
  <div class="foster-bg">
    <div class="top"></div>
    <!-- 导航条 -->
    <van-nav-bar  title="宠物寄养" fixed />

    <!-- 寄养单元 -->
    <Foster-add :addList="addList" v-for="addList in addData" :key="addList._id"></Foster-add>
    <foster-cell :item="item"  v-for="item in getData" :key="item.ii"></foster-cell>

    <div class="bottom"></div>
    <my-footer />
  </div>
</template>

<script>
import MyFooter from "@/components/MyFooter.vue";
import FosterCell from "@/components/FosterCell.vue"
import FosterAdd from "@/components/FosterAdd.vue";
export default {
  name: "foster",
  components: { MyFooter, FosterCell, FosterAdd },
  data() {
    return {
      getData: [],
      addData:[]
    };
  },
  mounted() {
    this.axios.get("http://120.79.2.254:3000/foster").then((res) => {
      // console.log("寄养:", res.data.result);
      this.getData = res.data.result;
    });
    this.axios.post('client/queryFosterCare').then(res=>{
      this.addData = res.data.data
      console.log(res.data.data);
    })
  },
};
</script>

<style lang="scss" scoped>
.top {
  padding-top: 60px;
}
.bottom{
  height: 60px;
}

</style>